package com.lucas.demo.memento;

import lombok.Data;

/**
 * @author Lucas
 * @date 2021/7/29 下午4:48
 */
@Data
public class Originator {

    private String state;


    public Memento saveStateToMemento(){
        return new Memento(state);
    }

    public void getStateFromMemento(Memento Memento){
        state = Memento.getState();
    }
}
